<div id="getLang"></div><a href="javascript: getLang()">getLang()</a> <br></br>
<div id="getCountry"></div><a href="javascript: getCountry()">getCountry()</a> <br></br>
<a href="javascript: set()">set(</a><input id="set_key" tabindex="1" type="text">,<input id="set_val" tabindex="1" type="text">) <div id="set"></div> <br></br>
<a href="javascript: getString()">getString(</a><input id="getString_key" tabindex="1" type="text">) <div id="getString"></div> <br></br>

<script type="text/javascript">
<?php echo $gadget->initialize();?>

function getLang() 
{
  document.getElementById('getLang').innerHTML = <?php echo $gadget->getLang() ?>
}
function getCountry() 
{
  document.getElementById('getCountry').innerHTML = <?php echo $gadget->getCountry() ?>
}
function set() 
{
  var key = document.getElementById('set_key').value;
  var val = document.getElementById('set_val').value;
  <?php echo $gadget->set('key','val') ?>
}
function getString() 
{
  var key = document.getElementById('getString_key').value;
  document.getElementById('getString').innerHTML = <?php echo $gadget->getString('key') ?>
}
</script>